package com.sky.controller.user;

import com.sky.dto.DishDTO;
import com.sky.dto.PrintDTO;
import com.sky.result.Result;
import com.sky.service.PrintService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController("userPrintController")
@RequestMapping("/user/print")
@Slf4j
@Api(tags = "C端打印接口")
public class PrintController {


    @Autowired
    PrintService printService;
    /**
     * 新增打印信息
     */
    @PostMapping("/add")
    @ApiOperation("新增打印信息到购物车")
    public Result addFileInfo(@RequestBody PrintDTO printDTO){

        //业务层实现添加打印信息功能
        printService.addFileInfo(printDTO);

        return Result.success();
    }
}
